<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$return['ischecklogin']=model('jy_weishop/member')->checklogin('','','','',true);
	$return['member']=cfc('core')->get_member($_SESSION['uid']);
	$goods=pdo_get('jy_djhome_serve',array('id'=>intval($_RQ['id']),'uniacid'=>$_SESSION['uniacid']));
	$goods['hdps']=$goods['hdps']?json_decode($goods['hdps'],true):array($goods['image']);
	if(!count($goods['hdps'])){
		$goods['hdps'][]=$goods['image'];
	}
	foreach($goods['hdps'] as &$img){
		$img=tomedia($img);
	}
	$goods['salenum']=pdo_getsum('jy_djhome_order_goods',array('uniacid'=>$_SESSION['uniacid'],'goodsid'=>$goods['id']),'total');
	$sharelink='jy_djhome/detail//id='.$goods['id'].'&fromuser='.$_SESSION['uid'];
	$return['sharedata']=array(
			'title'=>$goods['title'],
			'desc'=>$goods['desc']?:'项目列表，一个属于自己的在线服务系统！',
			'link'=>custom_url($sharelink,true),
			'imgUrl'=>tomedia($goods['image'])
	);
	$return['goods']=$goods;
	$return['shopset']=plugin('jy_weishop')->plugin_setting('shopset');
	$return['list']=array();
	set_html('title',$goods['title']);
	exi($return);
}
?>